/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.klikmee.sms.core.model;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author makcro
 */
@Entity
@Table(name = "config")
@NamedQueries({ 
    @NamedQuery(name = "Config.findAll", query = "SELECT c FROM Config c"),
    @NamedQuery(name = "Config.findByParamName", query = "SELECT c FROM Config c WHERE c.paramName = :paramName"),
    @NamedQuery(name = "Config.findByParamValue", query = "SELECT c FROM Config c WHERE c.paramValue = :paramValue") })
public class Config implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "paramName", nullable = false, length = 64)
    private String paramName;
    @Column(name = "paramValue", length = 256)
    private String paramValue;

    public Config() {
    }

    public Config( String paramName ) {
        this.paramName = paramName;
    }

    public Config( String paramName, String paramValue ) {
        this.paramName = paramName;
        this.paramValue = paramValue;
    }
    
    public String getParamName() {
        return paramName;
    }

    public void setParamName( String paramName ) {
        this.paramName = paramName;
    }

    public String getParamValue() {
        return paramValue;
    }

    public void setParamValue( String paramValue ) {
        this.paramValue = paramValue;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (paramName != null ? paramName.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals( Object object ) {
        if ( !(object instanceof Config) ) {
            return false;
        }
        Config other = (Config) object;
        if ( (this.paramName == null && other.paramName != null) || (this.paramName != null && !this.paramName.equals( other.paramName )) ) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.klikmee.sms.core.entities.Config[paramName=" + paramName + "]";
    }

}
